<div class="mr_moudle_head clearfix mr_w840">
	<div class="fl">
		<div class="mr_title">
			<span class="mr_title_l"></span><span class="mr_title_c">教育经历</span><span class="mr_title_r"></span>
		</div>
	</div>
	<div class="mr_head_r" onclick="resumeAdd('add_new_educational')" id="education">
		<i></i><em>添加</em>
	</div>
</div>
<div class="resume-content mr_w840">
    <form class="hide" id="add_new_educational">
         {!! csrf_field() !!}
        <div class="mr_add_work">
            <div class="form-group clearfix">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">学校名称</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="name" placeholder="学校名称" value="">
                </div>
            </div>
            <div class="form-group clearfix">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">所学专业</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="major" placeholder="所学专业" value="">
                </div>
            </div>
            <div class="form-group clearfix">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">学历</label>
                <div class="col-sm-9 col-xs-12">
                    <select class="form-control" name="degree">
                        @foreach($degree as $key=>$dg)
                        <option value="{{$key}}">{{$dg}}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="form-group clearfix">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">毕业时间</label>
                <div class="col-sm-9 col-xs-12">
                    <input size="16" type="text" class="form_datetime2 input-append date form-control" name="graduated_at" data-date-format="yyyy" value="" readonly>
                </div>
            </div>
            <div class="form-inline mt-20">
                <div class="form-group">
                   <span class="resume-btn-ok"  onclick="saveResumeEdu('/member/educational','add_new_educational','','add')">
                        保存
                  </span>  
                </div>
                <div class="form-group col-xs-offset-1">
                     <span class="resume-btn-cancel"   onclick="resumeAdd('add_new_educational')">
                        取消
                    </span>
                </div>
            </div>
        </div>
    </form>
    <div class="list_show" id="list_show_educational" >
        @foreach($educational as $edu)
        <div class="mr_jobe_list" id="educational_show_{{$edu->id}}">
            <div class="clearfix">
                <div class="mr_content_l">
					<div class="l2">
						<a class="projectTitle nourl">{{$edu->school}}</a>
						<p>{{$degree[$edu->degree]}}· {{$edu->major}}</p>
					</div>
				</div>
				<div class="mr_content_r">
					<div class="mr_edit mr_c_r_t" onclick="resumeEdit('educational_edit_{{$edu->id}}','educational_show_{{$edu->id}}')">
						<i></i><em>编辑</em>
					</div>
					<span>{{$edu->graduated_at}}毕业</span>
				</div>
            </div>
        </div>
        <form class="hide" id="educational_edit_{{$edu->id}}">
             {!! csrf_field() !!}
             <input type="hidden" name="edu_id" value="{{$edu->id}}">
            <div class="mr_add_work">
                <div class="form-group clearfix">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">学校名称</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control" name="name" placeholder="学校名称" value="{{$edu->school}}">
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">所学专业</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control" name="major" placeholder="所学专业" value="{{$edu->major}}">
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">学历</label>
                    <div class="col-sm-9 col-xs-12">
                        <select class="form-control" name="degree">
                            @foreach($degree as $key=>$dg)
                            <option value="{{$key}}" @if($key == $edu->degree) selected @endif>{{$dg}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">毕业时间</label>
                    <div class="col-sm-9 col-xs-12">
                        <input size="16" type="text" class="form_datetime2 input-append date form-control" name="graduated_at" value="{{$edu->graduated_at}}" data-date-format="yyyy" value="" readonly>
                    </div>
                </div>
                <div class="form-inline mt-20">
                    <div class="form-group">
                      <span class="resume-btn-ok"   onclick="saveResumeEdu('/member/educational','educational_edit_{{$edu->id}}','educational_show_{{$edu->id}}','edit')">
                            保存
                      </span>
                    </div>
                    <div class="form-group col-xs-offset-1">
                        <span class="resume-btn-cancel"   onclick="resumeEdit('educational_edit_{{$edu->id}}','educational_show_{{$edu->id}}')">
                            取消
                        </span>
                    </div>
                    <div class="fr resume-delete">
                        <a href="javascript:void(0)" onclick="deleteAlert(this)"><span class="font-16 color-red2">删除本条</span></a>
                        <div class="delete-alter">
                            <p>确定删除本条信息？</p>
                            <div>
								<span class="resume-del-ok" onclick="deleteResume('educational','/member/resume/{{$edu->id}}','{{$edu->id}}','{{ csrf_token() }}')">删除</span>
								<span class="resume-del-cancel">取消</span>													
							</div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        @endforeach
	</div>
</div>